package org.example.mybatis.mapper;

import org.example.mybatis.model.UserInfo;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

import static org.junit.jupiter.api.Assertions.*;

@SpringBootTest
class IUserXmlMapperTest {
    @Autowired
    private IUserXmlMapper iUserXmlInfo;

    @Test
    void getUserXml() {
        System.out.println(iUserXmlInfo.getUserXml());
    }

    @Test
    void insertUserinfo() {
        System.out.println(iUserXmlInfo.insertUserinfo("美羊羊","6666",14,1));
    }

    @Test
    void deleteUserInfo() {
        UserInfo userInfo = new UserInfo();
        userInfo.setId(10);
        Integer n = iUserXmlInfo.deleteUserInfo(userInfo);
        System.out.println("影响行数："+n);
    }

    @Test
    void upsetUserInfo() {
        UserInfo userInfo = new UserInfo();
        userInfo.setPassword("99999");
        userInfo.setId(3);
        Integer n = iUserXmlInfo.upsetUserInfo(userInfo);
        System.out.println("影响行数："+n);
    }

    @Test
    void getUserXml2() {
        System.out.println(iUserXmlInfo.getUserXml2());
    }
}